<template>
  <div>
    <el-button size="mini" type="success" @click="to">编辑</el-button>
    <eForm ref="form" :dict="dict" :sup_this="sup_this" :is-add="false"/>
  </div>
</template>
<script>
  import eForm from './form'
  export default {
    components: { eForm },
    props: {
      data: {
        type: Object,
        required: true
      },
      sup_this: {
        type: Object,
        required: true
      },
      dict: {
        type: Object,
        required: true
      }
    },
    methods: {
      to() {
        const _this = this.$refs.form
        _this.form = {
          id: this.data.id,
          deviceName: this.data.deviceName,
          deviceIp: this.data.deviceIp,
          devicePort: this.data.devicePort,
          devicePoint: this.data.devicePoint,
          deviceArea: this.data.deviceArea,
          refreshRate: this.data.refreshRate,
          deviceNum: this.data.deviceNum,
          deviceType: this.data.deviceType,
          deviceModel: this.data.deviceModel,
          deviceGrade: this.data.deviceGrade,
          deviceBrand: this.data.deviceBrand,
          manufacturer: this.data.manufacturer,
          creator: this.data.creator,
          createTime: this.data.createTime,
          updator: this.data.updator,
          updateTime: this.data.updateTime
        }
        _this.dialog = true
      }
    }
  }
</script>

<style scoped>
  div{
    display: inline-block;
    margin-right: 3px;
  }
</style>
